function TbPosterImages(params){ 
	 
}

TbPosterImages.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new TbPosterImages.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new TbPosterImages.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new TbPosterImages.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	/** 编号 [非空]       **/
	this.tbpiId=function(tbpiId){if(this.proxy)return this.getProxy().tbpiId(tbpiId);  this.put("tbpiId", tbpiId);return this;};
	/** and tbpi_id is null */
	this.tbpiIdNull=function(){if(this.proxy)return this.getProxy().tbpiIdNull();if(this.get("tbpiIdNot")==null)this.put("tbpiIdNot", "");this.put("tbpiId", null);return this;};
	/** not .... */
	this.tbpiIdNot=function(){if(this.proxy)return this.getProxy().tbpiIdNot();this.put("tbpiIdNot", "not");return this;};
	this.tbpiIdNotNull=function(){if(this.proxy)return this.getProxy().tbpiIdNotNull();this.put("tbpiIdNot", "not");this.put("tbpiId", null);return this;};
	this.tbpiIdNot=function(tbpiId){if(this.proxy)return this.getProxy().tbpiIdNot(tbpiId);this.put("tbpiIdNot", "not");this.put("tbpiId", tbpiId);return this;};
	/** and tbpi_id <= ? */
	this.tbpiIdMin=function(min){if(this.proxy)return this.getProxy().tbpiIdMin(min);this.put("tbpiIdMin", min);return this;};
	/** and tbpi_id >= ? */
	this.tbpiIdMax=function(max){if(this.proxy)return this.getProxy().tbpiIdMax(max);this.put("tbpiIdMax", max);return this;};
	this.tbpiIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiIdIn(ids);  this.put("tbpiIdIn", ids);return this;
	};	
	
	/** 品牌  [Merchant]      **/
	this.tbpiBrand=function(tbpiBrand){if(this.proxy)return this.getProxy().tbpiBrand(tbpiBrand);  this.put("tbpiBrand", tbpiBrand);return this;};
	/** and tbpi_brand is null */
	this.tbpiBrandNull=function(){if(this.proxy)return this.getProxy().tbpiBrandNull();if(this.get("tbpiBrandNot")==null)this.put("tbpiBrandNot", "");this.put("tbpiBrand", null);return this;};
	/** not .... */
	this.tbpiBrandNot=function(){if(this.proxy)return this.getProxy().tbpiBrandNot();this.put("tbpiBrandNot", "not");return this;};
	this.tbpiBrandNotNull=function(){if(this.proxy)return this.getProxy().tbpiBrandNotNull();this.put("tbpiBrandNot", "not");this.put("tbpiBrand", null);return this;};
	this.tbpiBrandNot=function(tbpiBrand){if(this.proxy)return this.getProxy().tbpiBrandNot(tbpiBrand);this.put("tbpiBrandNot", "not");this.put("tbpiBrand", tbpiBrand);return this;};
	this.tbpiBrandIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiBrandIn(ids);  this.put("tbpiBrandIn", ids);return this;
	};	
	
	/** 海报图片        **/
	this.tbpiPicture=function(tbpiPicture){if(this.proxy)return this.getProxy().tbpiPicture(tbpiPicture);  this.put("tbpiPicture", tbpiPicture);return this;};
	/** and tbpi_picture is null */
	this.tbpiPictureNull=function(){if(this.proxy)return this.getProxy().tbpiPictureNull();if(this.get("tbpiPictureNot")==null)this.put("tbpiPictureNot", "");this.put("tbpiPicture", null);return this;};
	/** not .... */
	this.tbpiPictureNot=function(){if(this.proxy)return this.getProxy().tbpiPictureNot();this.put("tbpiPictureNot", "not");return this;};
	this.tbpiPictureNotNull=function(){if(this.proxy)return this.getProxy().tbpiPictureNotNull();this.put("tbpiPictureNot", "not");this.put("tbpiPicture", null);return this;};
	this.tbpiPictureNot=function(tbpiPicture){if(this.proxy)return this.getProxy().tbpiPictureNot(tbpiPicture);this.put("tbpiPictureNot", "not");this.put("tbpiPicture", tbpiPicture);return this;};
	
	/** 宣传        **/
	this.tbpiWz=function(tbpiWz){if(this.proxy)return this.getProxy().tbpiWz(tbpiWz);  this.put("tbpiWz", tbpiWz);return this;};
	/** and tbpi_wz is null */
	this.tbpiWzNull=function(){if(this.proxy)return this.getProxy().tbpiWzNull();if(this.get("tbpiWzNot")==null)this.put("tbpiWzNot", "");this.put("tbpiWz", null);return this;};
	/** not .... */
	this.tbpiWzNot=function(){if(this.proxy)return this.getProxy().tbpiWzNot();this.put("tbpiWzNot", "not");return this;};
	this.tbpiWzNotNull=function(){if(this.proxy)return this.getProxy().tbpiWzNotNull();this.put("tbpiWzNot", "not");this.put("tbpiWz", null);return this;};
	this.tbpiWzNot=function(tbpiWz){if(this.proxy)return this.getProxy().tbpiWzNot(tbpiWz);this.put("tbpiWzNot", "not");this.put("tbpiWz", tbpiWz);return this;};
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有海报图片 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/business/posterimages.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取海报图片分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/business/posterimages.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取海报图片 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/business/posterimages.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

TbPosterImages.get = function(id){
	var protocol = ux.ajax("/admin/business/posterimages.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.tbPosterImages;
	return null;
}

TbPosterImages.where = new TbPosterImages.Where(0,true);